﻿@model IEnumerable<Helena.Areas.Reportes.Models.Kardex>
@using Telerik.Web.Mvc.UI;

@{
    Layout = null;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<!DOCTYPE html>

<html>
<head>
    <title>Mostrar Kardex Diario</title>
</head>
<body>

                @using (Html.BeginForm())
                {
                    <fieldset>
                    <legend>Kardex Diario</legend>
                        <table style="width:20%">
                            <tr>
                                <td>
                                    <div class="editor-label"><b>Fecha</b></div>
                                    <div class="editor-field">@Html.Telerik().DatePickerFor(p => p.First().Fecha).TodayButton().Value(DateTime.Now)</div>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                        <input type="submit" value="Exportar" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                }

@*
<table>
    <tr>
        <td>
                @using (Html.BeginForm())
                {
                    <fieldset>
                    <legend>Kardex Diario</legend>
                        <table style="width:100%">
                            <tr>
                                <td>
                                    <div class="editor-label"><b>Fecha</b></div>
                                    <div class="editor-field">@Html.Telerik().DatePickerFor(p => p.First().Fecha).TodayButton().Value(DateTime.Now)</div>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                        <input type="submit" value="Exportar" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                }
        </td>
    <tr>
        <td>
            @if (Model != null)
            { 
                <table>
                    <tr>
                        <th>
                            Producto
                        </th>
                        <th>
                            Cantidad Inicial
                        </th>
                        <th>
                            Entrada
                        </th>
                        <th>
                            Salida
                        </th>
                        <th>
                            Degustacion
                        </th>
                        <th>
                            Venta
                        </th>
                        <th>
                            Cantidad Final
                        </th>
                    </tr>
    
                @foreach (var item in Model) {
                    <tr>
                        <td>
                            @Html.DisplayFor(modelItem => item.ProducttoDescripcion)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.CantidadInicial)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.Entrada)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.Salida)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.Degustacion)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.Venta)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.CantidadFinal)
                        </td>
                    </tr>
                }
    
                </table>
            }
            </td>
        </tr>
        <tr>
            <td>
                <table style="width:20%"> 
                <tr> 
                    <td style="background-color: #CCFF99; color: #808080; font-weight: bold; font-size: 20px; border-style: ridge">
                    <@Html.ActionLink("ExportarExcel", "ExportarExcelDiario", "Kardex", null)>
                    </td>
                </tr>
                </table> 
            </td>
        </tr>
    </table>
</body>*@
</html>
